package com.easylinkin.linkappapi.calculaterule.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.easylinkin.linkappapi.calculaterule.entity.CalculateRule;
import java.util.List;

/**
 * <p>
 * 计算规则 服务类
 * </p>
 *
 * @author TongJie
 * @since 2020-06-17
 */
public interface CalculateRuleService extends IService<CalculateRule> {

    boolean add(CalculateRule calculateRule);

    /**
     * 根据条件查询计算规则所有
     */
    List<CalculateRule> getCalculateRules(CalculateRule calculateRule);

    /**
     * 查询计算规则
     *
     * @param id 主键
     * @return 查询结果对象
     */
    CalculateRule getCalculateRule(String id);

    /**
     * 根据条件查询计算规则 分页
     */
    IPage<CalculateRule> getCalculateRulesPage(Page<CalculateRule> page, CalculateRule customQueryParams);

    boolean updateCalculateRule(CalculateRule calculateRule);

    /**
     * 批量删除
     */
    boolean deleteBatch(List<CalculateRule> calculateRuleList);

}

